
#ifndef DECLARATION_H_
#define DECLARATION_H_

class IStmtVisitor;
class Ident;

#include "IStmt.h"
#include <Interfaces/IExp.h>
#include <string>
#include <AbsSyn/AbsSyn.h>
#include <AbsSyn/GenExpClasses/ExpressionType.h>


/**
 * \class Declaration Declaration.h <AbsSyn/Declaration.h>
 *
 *  @Author: calle
 *  @date Mar 28, 2011
 *  
 *  @brief Declaration statement...
 *
 *  <ident> = <expression>
 *
 *  \ingroup AbsSyn
 */


class Declaration: public IStmt {
public:
	/**
	 * \brief constructor of Declaration
	 *
	 * \todo This should be type and expression
	 */
	Declaration(ExpressionType type,Ident *ident,IExp *exp);

	/**
	 * \brief destructor
	 *
	 */
	virtual ~Declaration();

	/**
	 * \brief returns a string representation of the statement
	 */
    virtual std::string cmdString() const;

    /**
     * \brief Visitor interface..
     *
     * @param v
     */
    virtual void accept(IStmtVisitor *v);

    virtual Declaration* clone() const;


    /**
     * \brief get method for type associated with Declaration.
     *
     * Returns the type associated with the declaration.
     * Since this is a const, its not possible to use it straight away.
     * Use clone to get a copy, but remember to delete it.
     *
     * @return type
     */
    const ExpressionType getType() const;

    /**
     * \brief set method for type in declaration
     *
     * Sets the type in declaration.
     *
     * @param type
     */

    void setType(ExpressionType type);

    /**
     * \brief get method for identification associated with Declaration.
     *
     * Returns the associated identification for the declaration.
     * Since this is a const, its not possible to use it straight away.
     * Use clone to get a copy, but remember to delete it.
     *
     * @return type
     */
    const Ident& getIdent() const;

    /**
	 * \brief set method for Ident in declaration
	 *
	 * Sets the Identification in declaration.
	 *
	 * @param type
	 */
    void setIdent(const Ident& ident);

    /**
	* \brief get method for Expression associated with Declaration.
	*
	* Returns the associated expression for the declaration.
	* Since this is a const, its not possible to use it straight away.
	* Use clone to get a copy, but remember to delete it.
	*
	* @return type
	*/
    const IExp& getExp() const;

    void setExp(const IExp& exp);



private:
    ExpressionType m_Type; /// Type of
    Ident* m_Ident; /// Identification
    IExp* m_Exp; /// Expression


};

#endif /* ASSIGNMENT_H_ */
